#引用
from hello_shunzhi.hello_teacher import hello_student
hello_student.hello('sdf')


def computeScore():
    try:
        total_score = 0
        count = 0
        with open('score.txt', 'r') as f:
            for content in f:
                try:
                    score = float(content.strip())
                    if score < 0:
                        print(f"Warning: Negative score {score} will be ignored.")
                        continue
                    total_score += score
                    count += 1
                except ValueError:
                    print(f"Warning: Invalid score '{content.strip()}' will be ignored.")

        if count > 0:
            average_score = total_score / count
            print(f"The average score is: {average_score}")
        else:
            print("No valid scores found.")
    except FileNotFoundError:
        print("Error: The file 'score.txt' does not exist.")
    except Exception as e:
        print(f"An unexpected error occurred: {e}")

computeScore()
